package myschool.test3;

import myschool.dao.StudentDao;
import myschool.entity.Student;
import myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class Stuupdate {
    public static void main(String[] args) throws ParseException {
        //String ->Date
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        SqlSession s = MybatisUtil.get();
        StudentDao mapper = s.getMapper(StudentDao.class);
        Student stu=new Student();
        stu.setStuno(207L);
        //stu.setSname("尼古拉斯良木");
        stu.setSex("男");
        stu.setTelephone("1330065510844");
        int update = mapper.update(stu);
        System.out.println(update);
        MybatisUtil.close(s);


    }
}
